﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1._29_设计模式.mvc
{
    class mvc
    {
        public static void main()
        {
            v.dowork();
        }
    }

    class m
    {
        public static void dowork()
        {
            try
            {
                int j = 0;
                int i = 1 / j;
            }
            catch (Exception ee)
            {
                throw new Exception("除数不能为0");
            }
        }
    }

    class v
    {
        public static void dowork()
        {
            try
            {
                c.dowork();
            }
            catch (Exception ee)
            {
                Console.WriteLine(ee.ToString());
            }
        }
    }

    class c
    {
        public static void dowork()
        {
            m.dowork();
        }
    }

}
